to select ↑↓ to navigate
vfd provider

vfd provider

User Manual: Simplify VFD Integration for ERPNext

User Manual: Simplify VFD Integration for ERPNext


1. Overview

The Simplify VFD Integration allows seamless communication between ERPNext and the Simplify Virtual Fiscal Device (VFD) system. It facilitates automated generation and posting of fiscal invoices, ensuring compliance with tax authority regulations through real-time API interactions.


2. Key Features

  • Auto and manual generation of VFD tokens (Bearer & Refresh)
  • Direct VFD invoice generation from Sales Invoices
  • Support for multiple tax categories (standard, exempt, etc.)
  • Posting VFD Provider records for traceability
  • Token expiry management and auto-refresh logic

3. Pre-Requisites

  • ERPNext v13+ with internet access
  • Active Simplify VFD API credentials (username/password)
  • Configured "Simplify VFD Settings" per company
  • Items assigned with valid Tax Templates and codes

4. Step-by-Step Usage

a. Setup:

  1. Go to Simplify VFD Settings
  2. Enter Company, Username, and Password
  3. Click "Get Token" to generate bearer and refresh tokens

b. Sales Invoice Posting:

  1. Create and submit a Sales Invoice
  2. Ensure VFD Customer ID and VFD Cust ID Type are set (auto-fetched from Customer)
  3. Click "Generate VFD" if auto is not enabled
  4. System posts to Simplify VFD and updates invoice with receipt info

c. Auto-Posting:

  • Ensure "Is Auto Generate VFD" is checked to trigger posting automatically upon submission

5. Script Customizations

  • Custom Fields Added (via create_custom_fields):
    • On Customer, Sales Invoice, Item Tax Template, Mode of Payment
  • JavaScript UI Enhancements
    • Button handler to invoke get_bearer_token()
  • Python Backend
    • post_fiscal_receipt() to push invoice to VFD
    • refresh_bearer_token() to renew tokens
    • send_simplify_vfd_request() to standardize HTTP calls

6. Troubleshooting (Common Errors and Resolutions)

Error Cause Solution
Invalid Username or Password Wrong credentials Update Simplify VFD Settings with valid login info
Token Expired Expired token Re-run "Get Token" or check auto-refresh logic
VFD Status = Failed API call unsuccessful Check logs in VFD Provider Posting or retry manual post
No VFD Tax Code Missing in Item Tax Template Set vfd_taxcode on relevant Item Tax Templates

7. User Roles and Permissions

  • System Manager: Full access including token generation
  • Accounts User: Can generate VFD and create invoices
  • Healthcare Receptionist: Hidden VFD section via depends_on

8. Key Notes

  • Token lifespan is 20-25 minutes; auto-refresh is implemented
  • Errors are logged using frappe.log_error() for audit
  • Uses retry logic for API calls (up to 3 attempts)
  • VFD posting info stored in VFD Provider Posting doctype

9. What Business Process Pain Point Does It Help Remove

  • Eliminates manual VFD invoice generation outside ERP
  • Reduces errors due to human input in tax code selection
  • Ensures real-time compliance with fiscal authority
  • Provides centralized tracking of invoice-VFD relations in ERP

End of Document

Last updated 4 days ago
Was this helpful?
Thanks!